package com.lyw.forum.pojo.request;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;


@Data
public class ArticleCreateRequest {
    @NotNull(message = "板块id不能为空")
    @Min(value = 1, message = "板块id不能小于1")
    private Integer boardId;
    @Min(value = 1, message = "用户id不能小于1")
    private Integer userId;
    @NotNull(message = "标题不能为空")
    @Length(min = 1, max = 50, message = "标题长度不能超过50或小于1")
    private String title;
    @NotNull(message = "内容不能为空")
    @Length(min = 1, message = "内容长度不能小于1")
    private String content;

}
